﻿using System;

namespace Truncation.Detector.Win32
{
    internal class Result
    {
        public int LineNumber { private get; set; }
        public string Content { private get; set; }
        public override string ToString()
        {
            string real = Content.TrimStart(' ');
            int start = Content.Length - real.Length;
            int offset = real.Length;
            string context = String.Format("\u2308{0}\u2309", real);
            return String.Format("{0},{1},{2},{3},{4},\"{5}\"", LineNumber, start, offset, "Error", 5002, context.Replace("\"", "\"\""));
        }
    }
}
